define lengthr
proc(l)
  if nullp(l) then return 0 else return lengthr(cdr(l))+1 fi
end;
a := [1,2,3,4,5];
b := [];
c := [[1,2],[3,4],[5,6],7];
d := [[1,2]];
e := [[[[3]]]];
f := [1];
lengtha := lengthr(a);
lengthb := lengthr(b);
lengthc := lengthr(c);
lengthd := lengthr(d);
lengthe := lengthr(e);
lengthf := lengthr(f)
